from flask_script import Manager, Server
from flask import Flask
from app import create_app

app = create_app()




# 参数 Flask对象的实例

manager = Manager(app)
# @app.route('/show/')
# def show():
#     return '88888'
#
# @app.route('/')
# def index():
#     return 'index'
#
#
# @app.route('/list/<int:page>/<int:size>')
# def list(page, size):
#     print(type(page))
#     print(type(size))
#     return '123456'


# 添加脚本
manager.add_command('start', Server(host='127.0.0.1', port=9000))

if __name__ == '__main__':
    manager.run()
